<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>留言板</title>
	<link href="./Tpl/css/bootstrap.css" rel="stylesheet">
	<link href="./Tpl/css/css.css" rel="stylesheet">
</head>
<body>
	
<nav class="navbar navbar-default">
  <div class="container-fluid center">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Message</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="#">留言</a></li>
        <li><a href="#">发现</a></li>
        <li><a href="#">文章</a></li>
        <li><a href="#">圈子</a></li>
      </ul>
      
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">登录</a>
          <ul class="dropdown-menu">
            <form class="navbar-form navbar-right login" role="search">
	            <input type="text" class="form-control" placeholder="账号">
	            <input type="password" class="form-control" placeholder="密码">
	          	<button type="submit" class="btn btn-default">登录</button>
	        </form>
          </ul>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

<div class="container-fluid">
	<div class="main">
		<ul class="comments">
			<li class="item no_border">
				<form action="add.php" method="post">
    			<div class="row">
					<div class="hidden-xs col-sm-1 col-md-1 col-lg-1 img-responsive"></div>
					<div class="col-xs-12 ol-sm-10 col-md-10 col-lg-10">
					    <div class="item-main">
					        <div><span class="not_login fake-cursor">
    							<input type="text" class="form-control" name="username" placeholder="昵称">
					        </span></div>
					        <div class="item-content">
					        	<textarea class="col-md-12 form-control" rows="3" name="info" placeholder="请在这里输入留言……"></textarea>
					        </div>
					    </div>
					</div>
					<div class="col-xs-11 col-sm-1 col-md-1 col-lg-1 max">
					    <button type="submit" class="btn btn-success big">提交</button>
					</div>
				</div>
				</form>
			</li>
			<?php foreach ($data as $key => $value) { ?>
			<li class="item">
    			<div class="row">
					<div class="hidden-xs col-sm-1 col-md-1 col-lg-1 img-responsive"></div>
					<div class="col-xs-11 ol-sm-10 col-md-10 col-lg-10">
					    <div class="item-main">
					        <div><span class="not_login fake-cursor"><?php echo $value['username']  ?></span></div>
					        <div class="item-content"><?php echo $value['info']  ?></div>
					    </div>
					</div>
					<div class="col-xs-11 col-sm-1 col-md-1 col-lg-1 max">
					    <div class="item-main btnbox">
					        <a class="btn btn-info" href="./edit.php?id=<?php echo $key ?>">修改</a>
					        <a class="btn btn-danger" href="./dele.php?id=<?php echo $key ?>">删除</a>
					    </div>
					</div>
				</div>
			</li>
			<?php } ?>
		</ul>
	</div>
</div>

</body>

<script src="./Tpl/js/jquery.min.js"></script>
<script src="./Tpl/js/bootstrap.min.js"></script>

</html>